import Vue from 'vue'
import router from './router/index'
// import axios from 'axios'
// import VueAxios from 'vue-axios'
import App from './App.vue'
import api from './api/api'
import apiURL from './api/apiURL'
import filters from './filter/index'


//全局样式
import '@/assets/scss/global/global.scss';
// import env from './env'
// mock开关
const mock = false;
if (mock) {
  require('./mock/api');
}

// 设置全局过滤器
Object.keys(filters).forEach(filterName => {
  Vue.filter(filterName, filters[filterName])
})


// 将封装的axios挂载到原型上
Vue.prototype.$api = api
Vue.prototype.$apiURL = apiURL

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
